package view
{
	import component.Image;
	
	import flash.events.Event;
	
	public class DetailImg extends Image
	{
		public function DetailImg(drawAble:Boolean=true)
		{
			super(drawAble);
		}
		override public function onComplete(event:Event):void{
			bitmap = event.target.content;
			this.removeChild(loading);
			this.addChild(bitmap);
			var sx:Number = maxW/bitmap.width;
			var sy:Number = maxH/bitmap.height;
			if(sx<sy && sx<1){
				bitmap.scaleX = bitmap.scaleY = sx;
			}else if(sy<sx && sy<1){
				bitmap.scaleX = bitmap.scaleY = sy;
			}
			bitmap.x = (maxW - bitmap.width) * 0.5;
			bitmap.y = (maxH - bitmap.height) * 0.5;
		}
		override public function onMouseClick(event:Event):void{
			
		}
	}
}